package domain;

import java_persistence.NurseMapper;

/**
 * @author joseph simoneau <simoneau@gatech.edu>
 *
 */
public class Nurse extends User {
	
	public Nurse() {
		super();
	}
	
	public Nurse( String un, String pw, String n, String pn, String ad, String em, Boolean aa) {
		super( un, pw, n, pn, ad, em, aa);
	}
	
	
	
	// Database Functionality 
	
	// CREATES
	
	/**Promotes a user to becoming a nurse within the database.
	 * 
	 *   Please note that it is impossible to delete special users.  They must be demoted to only being users within the database first.
	 *   
	 * @param nmap retrieved from a valid, open SqlSession object.
	 */
	public void make_nurse(NurseMapper nmap) {
		if( this.getUsername() != null ) {
			nmap.create_nurse( this.getUsername() );
		}
	}
	
	// RETRIEVES
	
	// UPDATES
	
	// DELETES
	
	/**Demotes a Nurse to becoming a regular user within the database.
	 * 
	 * 	Please note that a nurse must be demoted to a regular user before s/he can be deleted from the database.
	 * 
	 * @param nmap
	 */
	public void delete_nurse(NurseMapper nmap) {
		nmap.delete_nurse( this.getUsername() );
	}
}
